{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 161,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import numpy as np # linear algebra\n",
    "import pandas as pd # data processing, CSV file I/O\n",
    "from sklearn.metrics import r2_score  #评价回归预测模型的性能\n",
    "from sklearn.metrics import mean_squared_error  #评价回归预测模型的性能\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "#color = sns.color_palette()\n",
    "\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## EDA"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 162,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Id</th>\n",
       "      <th>MSSubClass</th>\n",
       "      <th>MSZoning</th>\n",
       "      <th>LotFrontage</th>\n",
       "      <th>LotArea</th>\n",
       "      <th>Street</th>\n",
       "      <th>Alley</th>\n",
       "      <th>LotShape</th>\n",
       "      <th>LandContour</th>\n",
       "      <th>Utilities</th>\n",
       "      <th>...</th>\n",
       "      <th>PoolArea</th>\n",
       "      <th>PoolQC</th>\n",
       "      <th>Fence</th>\n",
       "      <th>MiscFeature</th>\n",
       "      <th>MiscVal</th>\n",
       "      <th>MoSold</th>\n",
       "      <th>YrSold</th>\n",
       "      <th>SaleType</th>\n",
       "      <th>SaleCondition</th>\n",
       "      <th>SalePrice</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>65.0</td>\n",
       "      <td>8450</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Reg</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>2008</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>208500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>20</td>\n",
       "      <td>RL</td>\n",
       "      <td>80.0</td>\n",
       "      <td>9600</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Reg</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>2007</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>181500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>68.0</td>\n",
       "      <td>11250</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "      <td>2008</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>223500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>70</td>\n",
       "      <td>RL</td>\n",
       "      <td>60.0</td>\n",
       "      <td>9550</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>2006</td>\n",
       "      <td>WD</td>\n",
       "      <td>Abnorml</td>\n",
       "      <td>140000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>84.0</td>\n",
       "      <td>14260</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "      <td>2008</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>250000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 81 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   Id  MSSubClass MSZoning  LotFrontage  LotArea Street Alley LotShape  \\\n",
       "0   1          60       RL         65.0     8450   Pave   NaN      Reg   \n",
       "1   2          20       RL         80.0     9600   Pave   NaN      Reg   \n",
       "2   3          60       RL         68.0    11250   Pave   NaN      IR1   \n",
       "3   4          70       RL         60.0     9550   Pave   NaN      IR1   \n",
       "4   5          60       RL         84.0    14260   Pave   NaN      IR1   \n",
       "\n",
       "  LandContour Utilities    ...     PoolArea PoolQC Fence MiscFeature MiscVal  \\\n",
       "0         Lvl    AllPub    ...            0    NaN   NaN         NaN       0   \n",
       "1         Lvl    AllPub    ...            0    NaN   NaN         NaN       0   \n",
       "2         Lvl    AllPub    ...            0    NaN   NaN         NaN       0   \n",
       "3         Lvl    AllPub    ...            0    NaN   NaN         NaN       0   \n",
       "4         Lvl    AllPub    ...            0    NaN   NaN         NaN       0   \n",
       "\n",
       "  MoSold YrSold  SaleType  SaleCondition  SalePrice  \n",
       "0      2   2008        WD         Normal     208500  \n",
       "1      5   2007        WD         Normal     181500  \n",
       "2      9   2008        WD         Normal     223500  \n",
       "3      2   2006        WD        Abnorml     140000  \n",
       "4     12   2008        WD         Normal     250000  \n",
       "\n",
       "[5 rows x 81 columns]"
      ]
     },
     "execution_count": 162,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# path to where the data lies\n",
    "dpath = '/Users/limeng/Desktop/ML\\DL learn/CSDN/正式课程/week1/hw_house/Ames_House/'\n",
    "data = pd.read_csv(dpath + \"Ames_House_train.csv\")\n",
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 163,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(1460, 81)"
      ]
     },
     "execution_count": 163,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 164,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Id                  0\n",
       "MSSubClass          0\n",
       "MSZoning            0\n",
       "LotFrontage       259\n",
       "LotArea             0\n",
       "Street              0\n",
       "Alley            1369\n",
       "LotShape            0\n",
       "LandContour         0\n",
       "Utilities           0\n",
       "LotConfig           0\n",
       "LandSlope           0\n",
       "Neighborhood        0\n",
       "Condition1          0\n",
       "Condition2          0\n",
       "BldgType            0\n",
       "HouseStyle          0\n",
       "OverallQual         0\n",
       "OverallCond         0\n",
       "YearBuilt           0\n",
       "YearRemodAdd        0\n",
       "RoofStyle           0\n",
       "RoofMatl            0\n",
       "Exterior1st         0\n",
       "Exterior2nd         0\n",
       "MasVnrType          8\n",
       "MasVnrArea          8\n",
       "ExterQual           0\n",
       "ExterCond           0\n",
       "Foundation          0\n",
       "                 ... \n",
       "BedroomAbvGr        0\n",
       "KitchenAbvGr        0\n",
       "KitchenQual         0\n",
       "TotRmsAbvGrd        0\n",
       "Functional          0\n",
       "Fireplaces          0\n",
       "FireplaceQu       690\n",
       "GarageType         81\n",
       "GarageYrBlt        81\n",
       "GarageFinish       81\n",
       "GarageCars          0\n",
       "GarageArea          0\n",
       "GarageQual         81\n",
       "GarageCond         81\n",
       "PavedDrive          0\n",
       "WoodDeckSF          0\n",
       "OpenPorchSF         0\n",
       "EnclosedPorch       0\n",
       "3SsnPorch           0\n",
       "ScreenPorch         0\n",
       "PoolArea            0\n",
       "PoolQC           1453\n",
       "Fence            1179\n",
       "MiscFeature      1406\n",
       "MiscVal             0\n",
       "MoSold              0\n",
       "YrSold              0\n",
       "SaleType            0\n",
       "SaleCondition       0\n",
       "SalePrice           0\n",
       "Length: 81, dtype: int64"
      ]
     },
     "execution_count": 164,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "### 查看是否有空值\n",
    "data.isnull().sum()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 165,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(1460, 75)"
      ]
     },
     "execution_count": 165,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#Alley/FireplaceQu/PoolQC/Fence/MiscFeature 缺失数据多，删了\n",
    "data = data.drop(['Alley','FireplaceQu','PoolQC','Fence','MiscFeature','Id'], axis = 1)\n",
    "data.shape"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 类别型变量-onehot encoder\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 166,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "20     536\n",
       "60     299\n",
       "50     144\n",
       "120     87\n",
       "30      69\n",
       "160     63\n",
       "70      60\n",
       "80      58\n",
       "90      52\n",
       "190     30\n",
       "85      20\n",
       "75      16\n",
       "45      12\n",
       "180     10\n",
       "40       4\n",
       "Name: MSSubClass, dtype: int64"
      ]
     },
     "execution_count": 166,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#MSSubClass\n",
    "data.MSSubClass = data.MSSubClass.astype(str)\n",
    "data.MSSubClass.value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 167,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>MSSubClass_120</th>\n",
       "      <th>MSSubClass_160</th>\n",
       "      <th>MSSubClass_180</th>\n",
       "      <th>MSSubClass_190</th>\n",
       "      <th>MSSubClass_20</th>\n",
       "      <th>MSSubClass_30</th>\n",
       "      <th>MSSubClass_40</th>\n",
       "      <th>MSSubClass_45</th>\n",
       "      <th>MSSubClass_50</th>\n",
       "      <th>MSSubClass_60</th>\n",
       "      <th>MSSubClass_70</th>\n",
       "      <th>MSSubClass_75</th>\n",
       "      <th>MSSubClass_80</th>\n",
       "      <th>MSSubClass_85</th>\n",
       "      <th>MSSubClass_90</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   MSSubClass_120  MSSubClass_160  MSSubClass_180  MSSubClass_190  \\\n",
       "0               0               0               0               0   \n",
       "1               0               0               0               0   \n",
       "2               0               0               0               0   \n",
       "3               0               0               0               0   \n",
       "4               0               0               0               0   \n",
       "\n",
       "   MSSubClass_20  MSSubClass_30  MSSubClass_40  MSSubClass_45  MSSubClass_50  \\\n",
       "0              0              0              0              0              0   \n",
       "1              1              0              0              0              0   \n",
       "2              0              0              0              0              0   \n",
       "3              0              0              0              0              0   \n",
       "4              0              0              0              0              0   \n",
       "\n",
       "   MSSubClass_60  MSSubClass_70  MSSubClass_75  MSSubClass_80  MSSubClass_85  \\\n",
       "0              1              0              0              0              0   \n",
       "1              0              0              0              0              0   \n",
       "2              1              0              0              0              0   \n",
       "3              0              1              0              0              0   \n",
       "4              1              0              0              0              0   \n",
       "\n",
       "   MSSubClass_90  \n",
       "0              0  \n",
       "1              0  \n",
       "2              0  \n",
       "3              0  \n",
       "4              0  "
      ]
     },
     "execution_count": 167,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.get_dummies(data.MSSubClass,prefix='MSSubClass').head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 168,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>LotFrontage</th>\n",
       "      <th>LotArea</th>\n",
       "      <th>OverallQual</th>\n",
       "      <th>OverallCond</th>\n",
       "      <th>YearBuilt</th>\n",
       "      <th>YearRemodAdd</th>\n",
       "      <th>MasVnrArea</th>\n",
       "      <th>BsmtFinSF1</th>\n",
       "      <th>BsmtFinSF2</th>\n",
       "      <th>BsmtUnfSF</th>\n",
       "      <th>...</th>\n",
       "      <th>SaleType_ConLw</th>\n",
       "      <th>SaleType_New</th>\n",
       "      <th>SaleType_Oth</th>\n",
       "      <th>SaleType_WD</th>\n",
       "      <th>SaleCondition_Abnorml</th>\n",
       "      <th>SaleCondition_AdjLand</th>\n",
       "      <th>SaleCondition_Alloca</th>\n",
       "      <th>SaleCondition_Family</th>\n",
       "      <th>SaleCondition_Normal</th>\n",
       "      <th>SaleCondition_Partial</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>65.0</td>\n",
       "      <td>8450</td>\n",
       "      <td>7</td>\n",
       "      <td>5</td>\n",
       "      <td>2003</td>\n",
       "      <td>2003</td>\n",
       "      <td>196.0</td>\n",
       "      <td>706</td>\n",
       "      <td>0</td>\n",
       "      <td>150</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>80.0</td>\n",
       "      <td>9600</td>\n",
       "      <td>6</td>\n",
       "      <td>8</td>\n",
       "      <td>1976</td>\n",
       "      <td>1976</td>\n",
       "      <td>0.0</td>\n",
       "      <td>978</td>\n",
       "      <td>0</td>\n",
       "      <td>284</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>68.0</td>\n",
       "      <td>11250</td>\n",
       "      <td>7</td>\n",
       "      <td>5</td>\n",
       "      <td>2001</td>\n",
       "      <td>2002</td>\n",
       "      <td>162.0</td>\n",
       "      <td>486</td>\n",
       "      <td>0</td>\n",
       "      <td>434</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>60.0</td>\n",
       "      <td>9550</td>\n",
       "      <td>7</td>\n",
       "      <td>5</td>\n",
       "      <td>1915</td>\n",
       "      <td>1970</td>\n",
       "      <td>0.0</td>\n",
       "      <td>216</td>\n",
       "      <td>0</td>\n",
       "      <td>540</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>84.0</td>\n",
       "      <td>14260</td>\n",
       "      <td>8</td>\n",
       "      <td>5</td>\n",
       "      <td>2000</td>\n",
       "      <td>2000</td>\n",
       "      <td>350.0</td>\n",
       "      <td>655</td>\n",
       "      <td>0</td>\n",
       "      <td>490</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 285 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   LotFrontage  LotArea  OverallQual  OverallCond  YearBuilt  YearRemodAdd  \\\n",
       "0         65.0     8450            7            5       2003          2003   \n",
       "1         80.0     9600            6            8       1976          1976   \n",
       "2         68.0    11250            7            5       2001          2002   \n",
       "3         60.0     9550            7            5       1915          1970   \n",
       "4         84.0    14260            8            5       2000          2000   \n",
       "\n",
       "   MasVnrArea  BsmtFinSF1  BsmtFinSF2  BsmtUnfSF          ...            \\\n",
       "0       196.0         706           0        150          ...             \n",
       "1         0.0         978           0        284          ...             \n",
       "2       162.0         486           0        434          ...             \n",
       "3         0.0         216           0        540          ...             \n",
       "4       350.0         655           0        490          ...             \n",
       "\n",
       "   SaleType_ConLw  SaleType_New  SaleType_Oth  SaleType_WD  \\\n",
       "0               0             0             0            1   \n",
       "1               0             0             0            1   \n",
       "2               0             0             0            1   \n",
       "3               0             0             0            1   \n",
       "4               0             0             0            1   \n",
       "\n",
       "   SaleCondition_Abnorml  SaleCondition_AdjLand  SaleCondition_Alloca  \\\n",
       "0                      0                      0                     0   \n",
       "1                      0                      0                     0   \n",
       "2                      0                      0                     0   \n",
       "3                      1                      0                     0   \n",
       "4                      0                      0                     0   \n",
       "\n",
       "   SaleCondition_Family  SaleCondition_Normal  SaleCondition_Partial  \n",
       "0                     0                     1                      0  \n",
       "1                     0                     1                      0  \n",
       "2                     0                     1                      0  \n",
       "3                     0                     0                      0  \n",
       "4                     0                     1                      0  \n",
       "\n",
       "[5 rows x 285 columns]"
      ]
     },
     "execution_count": 168,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "all_dummy_data = pd.get_dummies(data)\n",
    "all_dummy_data.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 变量间相关性"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 169,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#get the names of all the columns\n",
    "cols=all_dummy_data.columns \n",
    "\n",
    "# Calculates pearson co-efficient for all combinations，通常认为相关系数大于0.5的为强相关\n",
    "data_corr = all_dummy_data.corr().abs()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 170,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "SaleType_New and SaleCondition_Partial = 0.99\n",
      "MSSubClass_190 and BldgType_2fmCon = 0.98\n",
      "Exterior1st_VinylSd and Exterior2nd_VinylSd = 0.98\n",
      "Exterior1st_CemntBd and Exterior2nd_CmentBd = 0.97\n",
      "Exterior1st_MetalSd and Exterior2nd_MetalSd = 0.97\n",
      "MSSubClass_80 and HouseStyle_SLvl = 0.94\n",
      "MSSubClass_50 and HouseStyle_1.5Fin = 0.94\n",
      "RoofStyle_Gable and RoofStyle_Hip = 0.93\n",
      "LotShape_IR1 and LotShape_Reg = 0.93\n",
      "MSSubClass_45 and HouseStyle_1.5Unf = 0.93\n",
      "LandSlope_Gtl and LandSlope_Mod = 0.91\n",
      "ExterQual_Gd and ExterQual_TA = 0.91\n",
      "ExterCond_Gd and ExterCond_TA = 0.89\n",
      "Exterior1st_HdBoard and Exterior2nd_HdBoard = 0.88\n",
      "GarageCars and GarageArea = 0.88\n",
      "MSZoning_FV and Neighborhood_Somerst = 0.86\n",
      "Exterior1st_Wd Sdng and Exterior2nd_Wd Sdng = 0.86\n",
      "PavedDrive_N and PavedDrive_Y = 0.86\n",
      "Electrical_FuseA and Electrical_SBrkr = 0.85\n",
      "Exterior1st_AsbShng and Exterior2nd_AsbShng = 0.85\n",
      "RoofStyle_Flat and RoofMatl_Tar&Grv = 0.83\n",
      "YearBuilt and GarageYrBlt = 0.83\n",
      "GrLivArea and TotRmsAbvGrd = 0.83\n",
      "KitchenQual_Gd and KitchenQual_TA = 0.82\n",
      "TotalBsmtSF and 1stFlrSF = 0.82\n",
      "GarageQual_Ex and GarageCond_Ex = 0.82\n",
      "2ndFlrSF and HouseStyle_2Story = 0.81\n",
      "MSZoning_RL and MSZoning_RM = 0.81\n",
      "MasVnrType_BrkFace and MasVnrType_None = 0.80\n",
      "OverallQual and SalePrice = 0.79\n",
      "2ndFlrSF and HouseStyle_1Story = 0.79\n",
      "GarageQual_TA and GarageCond_TA = 0.79\n",
      "Foundation_CBlock and Foundation_PConc = 0.78\n",
      "Exterior1st_Stucco and Exterior2nd_Stucco = 0.78\n",
      "MSSubClass_120 and BldgType_TwnhsE = 0.78\n",
      "SaleType_New and SaleType_WD = 0.77\n",
      "SaleType_WD and SaleCondition_Partial = 0.77\n",
      "BsmtQual_Gd and BsmtQual_TA = 0.77\n",
      "MSSubClass_60 and HouseStyle_2Story = 0.76\n",
      "MSSubClass_20 and HouseStyle_1Story = 0.76\n",
      "Exterior1st_Plywood and Exterior2nd_Plywood = 0.76\n",
      "LotConfig_Corner and LotConfig_Inside = 0.75\n",
      "Heating_GasA and Heating_GasW = 0.75\n",
      "MSSubClass_85 and HouseStyle_SFoyer = 0.73\n",
      "GarageType_Attchd and GarageType_Detchd = 0.73\n",
      "BsmtFinSF2 and BsmtFinType2_Unf = 0.72\n",
      "GrLivArea and SalePrice = 0.71\n",
      "BsmtCond_Po and Electrical_Mix = 0.71\n",
      "Condition2_RRAe and RoofStyle_Shed = 0.71\n",
      "2ndFlrSF and GrLivArea = 0.69\n",
      "2ndFlrSF and MSSubClass_60 = 0.69\n",
      "MasVnrArea and MasVnrType_None = 0.69\n",
      "KitchenAbvGr and MSSubClass_90 = 0.68\n",
      "KitchenAbvGr and BldgType_Duplex = 0.68\n",
      "BedroomAbvGr and TotRmsAbvGrd = 0.68\n",
      "MSSubClass_75 and HouseStyle_2.5Unf = 0.68\n",
      "Exterior1st_BrkFace and Exterior2nd_BrkFace = 0.67\n",
      "ExterQual_TA and KitchenQual_TA = 0.67\n",
      "GarageYrBlt and Foundation_PConc = 0.66\n",
      "HouseStyle_1Story and HouseStyle_2Story = 0.66\n",
      "BldgType_1Fam and BldgType_TwnhsE = 0.66\n",
      "SaleCondition_Normal and SaleCondition_Partial = 0.65\n",
      "HeatingQC_Ex and HeatingQC_TA = 0.65\n",
      "GarageQual_Po and GarageCond_Po = 0.65\n",
      "YearBuilt and Foundation_PConc = 0.65\n",
      "BsmtFinSF1 and BsmtFullBath = 0.65\n",
      "RoofStyle_Flat and RoofMatl_CompShg = 0.65\n",
      "RoofMatl_CompShg and RoofMatl_Tar&Grv = 0.65\n",
      "OverallQual and ExterQual_TA = 0.65\n",
      "SaleType_New and SaleCondition_Normal = 0.65\n",
      "YearRemodAdd and GarageYrBlt = 0.64\n",
      "GarageCars and SalePrice = 0.64\n",
      "BsmtCond_Gd and BsmtCond_TA = 0.64\n",
      "SaleType_WD and SaleCondition_Normal = 0.63\n",
      "YearBuilt and BsmtQual_TA = 0.63\n",
      "Condition2_Feedr and Condition2_Norm = 0.63\n",
      "GrLivArea and FullBath = 0.63\n",
      "LandContour_Bnk and LandContour_Lvl = 0.63\n",
      "BsmtFinSF1 and BsmtFinType1_Unf = 0.63\n",
      "ExterQual_Gd and KitchenQual_Gd = 0.63\n",
      "Neighborhood_NPkVill and Exterior2nd_Brk Cmn = 0.63\n",
      "GarageArea and SalePrice = 0.62\n",
      "HalfBath and HouseStyle_2Story = 0.62\n",
      "MSSubClass_160 and BldgType_Twnhs = 0.62\n",
      "ExterQual_TA and Foundation_PConc = 0.62\n",
      "ExterQual_Gd and KitchenQual_TA = 0.62\n",
      "2ndFlrSF and TotRmsAbvGrd = 0.62\n",
      "TotalBsmtSF and SalePrice = 0.61\n",
      "GarageType_Detchd and GarageFinish_Unf = 0.61\n",
      "2ndFlrSF and HalfBath = 0.61\n",
      "Condition1_Feedr and Condition1_Norm = 0.61\n",
      "HalfBath and MSSubClass_60 = 0.61\n",
      "1stFlrSF and SalePrice = 0.61\n",
      "Foundation_PConc and BsmtQual_TA = 0.60\n",
      "BsmtUnfSF and BsmtFinType1_Unf = 0.60\n",
      "2ndFlrSF and MSSubClass_20 = 0.60\n",
      "OverallQual and GarageCars = 0.60\n",
      "GarageYrBlt and BsmtQual_TA = 0.60\n",
      "GarageYrBlt and ExterQual_TA = 0.60\n",
      "OverallQual and GrLivArea = 0.59\n",
      "YearBuilt and YearRemodAdd = 0.59\n",
      "LowQualFinSF and HouseStyle_2.5Fin = 0.59\n",
      "YearBuilt and ExterQual_TA = 0.59\n",
      "SalePrice and ExterQual_TA = 0.59\n",
      "GarageYrBlt and GarageCars = 0.59\n",
      "ExterQual_Gd and Foundation_PConc = 0.59\n",
      "SaleCondition_Abnorml and SaleCondition_Normal = 0.58\n",
      "BsmtExposure_Av and BsmtExposure_No = 0.58\n",
      "YearRemodAdd and KitchenQual_TA = 0.58\n",
      "Exterior1st_AsphShn and Exterior2nd_AsphShn = 0.58\n",
      "Condition2_PosA and ExterCond_Ex = 0.58\n",
      "Electrical_Mix and GarageQual_Po = 0.58\n",
      "OverallQual and YearBuilt = 0.57\n",
      "MasVnrArea and MasVnrType_BrkFace = 0.57\n",
      "YearRemodAdd and Foundation_PConc = 0.57\n",
      "Functional_Min2 and Functional_Typ = 0.57\n",
      "OverallQual and Foundation_PConc = 0.57\n",
      "1stFlrSF and GrLivArea = 0.57\n",
      "YearRemodAdd and ExterQual_TA = 0.57\n",
      "GarageYrBlt and GarageArea = 0.56\n",
      "ExterQual_Ex and KitchenQual_Ex = 0.56\n",
      "Exterior1st_VinylSd and Foundation_PConc = 0.56\n",
      "OverallQual and GarageArea = 0.56\n",
      "MSZoning_RM and Neighborhood_OldTown = 0.56\n",
      "Exterior2nd_VinylSd and Foundation_PConc = 0.56\n",
      "FullBath and SalePrice = 0.56\n",
      "YearBuilt and BsmtQual_Gd = 0.56\n",
      "LandContour_HLS and LandContour_Lvl = 0.56\n",
      "YearBuilt and ExterQual_Gd = 0.56\n",
      "ExterQual_TA and KitchenQual_Gd = 0.56\n",
      "FullBath and TotRmsAbvGrd = 0.55\n",
      "YearBuilt and Foundation_BrkTil = 0.55\n",
      "OverallQual and KitchenQual_TA = 0.55\n",
      "Foundation_PConc and KitchenQual_TA = 0.55\n",
      "SalePrice and BsmtQual_Ex = 0.55\n",
      "OverallQual and YearRemodAdd = 0.55\n",
      "OverallQual and FullBath = 0.55\n",
      "OverallQual and GarageYrBlt = 0.55\n",
      "OverallQual and ExterQual_Gd = 0.55\n",
      "GarageQual_Fa and GarageQual_TA = 0.55\n",
      "MSSubClass_120 and BldgType_1Fam = 0.54\n",
      "ExterQual_TA and BsmtQual_TA = 0.54\n",
      "Functional_Min1 and Functional_Typ = 0.54\n",
      "GarageYrBlt and GarageFinish_Unf = 0.54\n",
      "LotArea and LandSlope_Sev = 0.54\n",
      "YearBuilt and GarageCars = 0.54\n",
      "OverallQual and TotalBsmtSF = 0.54\n",
      "GarageYrBlt and Exterior1st_VinylSd = 0.54\n",
      "GarageYrBlt and ExterQual_Gd = 0.54\n",
      "GarageFinish_RFn and GarageFinish_Unf = 0.54\n",
      "TotRmsAbvGrd and SalePrice = 0.53\n",
      "LandContour_Lvl and LandSlope_Gtl = 0.53\n",
      "YearRemodAdd and KitchenQual_Gd = 0.53\n",
      "Exterior1st_BrkComm and Exterior2nd_Brk Cmn = 0.53\n",
      "ExterQual_TA and HeatingQC_Ex = 0.53\n",
      "GarageYrBlt and Exterior2nd_VinylSd = 0.53\n",
      "MSSubClass_180 and Neighborhood_MeadowV = 0.53\n",
      "ExterQual_Ex and BsmtQual_Ex = 0.53\n",
      "YearRemodAdd and ExterQual_Gd = 0.53\n",
      "Foundation_PConc and HeatingQC_Ex = 0.53\n",
      "Exterior1st_WdShing and Exterior2nd_Wd Shng = 0.53\n",
      "BsmtCond_Fa and BsmtCond_TA = 0.53\n",
      "MSSubClass_75 and HouseStyle_2.5Fin = 0.53\n",
      "Neighborhood_MeadowV and Exterior2nd_CmentBd = 0.52\n",
      "YearBuilt and GarageFinish_Unf = 0.52\n",
      "YearBuilt and SalePrice = 0.52\n",
      "BsmtFinSF1 and TotalBsmtSF = 0.52\n",
      "GrLivArea and BedroomAbvGr = 0.52\n",
      "Neighborhood_MeadowV and Exterior1st_CemntBd = 0.52\n",
      "SalePrice and KitchenQual_TA = 0.52\n",
      "YearBuilt and Exterior1st_VinylSd = 0.52\n",
      "BsmtQual_Ex and KitchenQual_Ex = 0.52\n",
      "YearRemodAdd and HeatingQC_Ex = 0.52\n",
      "YearBuilt and Exterior2nd_VinylSd = 0.51\n",
      "ExterQual_Gd and BsmtQual_TA = 0.51\n",
      "Foundation_CBlock and BsmtQual_TA = 0.51\n",
      "GarageCars and GarageCond_TA = 0.51\n",
      "YearRemodAdd and SalePrice = 0.51\n",
      "MSSubClass_60 and HouseStyle_1Story = 0.50\n",
      "SalePrice and KitchenQual_Ex = 0.50\n",
      "2ndFlrSF and BedroomAbvGr = 0.50\n",
      "MSSubClass_20 and HouseStyle_2Story = 0.50\n",
      "ExterQual_Gd and BsmtQual_Gd = 0.50\n"
     ]
    }
   ],
   "source": [
    "#Set the threshold to select only highly correlated attributes\n",
    "threshold = 0.5\n",
    "# List of pairs along with correlation above threshold\n",
    "corr_list = []\n",
    "#size = data.shape[1]\n",
    "size = data_corr.shape[0]\n",
    "\n",
    "#Search for the highly correlated pairs\n",
    "for i in range(0, size): #for 'size' features\n",
    "    for j in range(i+1,size): #avoid repetition\n",
    "        if (data_corr.iloc[i,j] >= threshold and data_corr.iloc[i,j] < 1) or (data_corr.iloc[i,j] < 0 and data_corr.iloc[i,j] <= -threshold):\n",
    "            corr_list.append([data_corr.iloc[i,j],i,j]) #store correlation and columns index\n",
    "\n",
    "#Sort to show higher ones first            \n",
    "s_corr_list = sorted(corr_list,key=lambda x: -abs(x[0]))\n",
    "\n",
    "#Print correlations and column names\n",
    "for v,i,j in s_corr_list:\n",
    "    print (\"%s and %s = %.2f\" % (cols[i],cols[j],v))\n",
    "    \n",
    "## SaleCondition_Partial,MSSubClass_190,Exterior2nd_CmentBd,MSSubClass_80,\n",
    "##MSSubClass_50,RoofStyle_Hip,LotShape_Reg,HouseStyle_1.5Unf,LandSlope_Mod,ExterQual_TA"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 缺失值处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 171,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from scipy.interpolate import lagrange #导入拉格朗日插值函数\n",
    "def ployinterp_column(s, n, k=5):\n",
    "    y = s[list(range(n-k, n)) + list(range(n+1, n+1+k))] #取数\n",
    "    y = y[y.notnull()] #剔除空值\n",
    "    return lagrange(y.index, list(y))(n) #插值并返回插值结果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 172,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/limeng/anaconda3/lib/python3.6/site-packages/ipykernel_launcher.py:4: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n",
      "  after removing the cwd from sys.path.\n"
     ]
    }
   ],
   "source": [
    "for i in all_dummy_data.columns:\n",
    "    for j in range(len(all_dummy_data)):\n",
    "        if (all_dummy_data[i].isnull())[j]: #如果为空即插值。\n",
    "            all_dummy_data[i][j] = ployinterp_column(all_dummy_data[i], j)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 173,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/limeng/anaconda3/lib/python3.6/site-packages/matplotlib/axes/_axes.py:6462: UserWarning: The 'normed' kwarg is deprecated, and has been replaced by the 'density' kwarg.\n",
      "  warnings.warn(\"The 'normed' kwarg is deprecated, and has been \"\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAAN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TUpZYjDHGpJQlFmOMMSn1\n/wO7rvR+lokW/gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 目标y（houseprice）的直方图／分布\n",
    "fig = plt.figure()\n",
    "sns.distplot(all_dummy_data.SalePrice.values, bins=50, kde=True)\n",
    "plt.xlabel('price', fontsize=12)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 174,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/limeng/anaconda3/lib/python3.6/site-packages/matplotlib/axes/_axes.py:6462: UserWarning: The 'normed' kwarg is deprecated, and has been replaced by the 'density' kwarg.\n",
      "  warnings.warn(\"The 'normed' kwarg is deprecated, and has been \"\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAENCAYAAAD0eSVZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xt8nGWd9/HPbybnc9KkTZM0PbfQ\nQmkhUJBDURGQBaqiHHV1ZWVxxd3Xo+uuPu6iwvqsuK6rrqjLKrKA4LKIbGXRgnISaJG29EwP6SlJ\nTzmfjzO5nj9mWoc0aSbtJPfM5Pt+veaVmbmvmfly0/nlynVf93Wbcw4REUkuPq8DiIhI7Km4i4gk\nIRV3EZEkpOIuIpKEVNxFRJKQiruISBJScRcRSUIq7iIiSUjFXUQkCaV49cHFxcVu1qxZXn28iEhC\nWr9+faNzrmS0dqMWdzN7ELgWqHfOnXWSducDa4GbnHNPjva+s2bNYt26daM1ExGRCGZ2IJp20QzL\nPARcPcqH+YH7gNXRfKiIiIyvUYu7c+4VoHmU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H\nwkMyrWbWClwCTB9DLpExUXGXRHWIUNE8ppI/rgd+mHdegi6y5z2a423NLIfQMErkOuMjrbTXCPQC\nw13IoRZ4xDlXEHHLds59Ywy5RMZExV0S1ePA35tZSXid7buBR8PbngD+zMzONLMsRr582nCuMbNL\nwmu23wu84ZwbtefvnBsEHgS+bWZlZuY3s4vCB3kfBa4zs6vCz2eY2eVm5vk1UCV5qbhLovpHQuPW\nmwmts70h/BzOuV8D3wNeJLRW+Jrwa/qieN/HgK8QGo45j9DYfrT+JpzlzfDr7wN84V8OK4H/CzQQ\n6sl/AX3/ZBxpPXdJemZ2JqGLMqQ75wInafcQUOec+/uJyiYyXtRzkKRkZh80s7TwJdzuA351ssIu\nkmxU3CVZ/QWhIZA9QBD4NICZbQuvBzP0NpbhF5G4p2EZEZEkpJ67iEgSUnEXEUlCKu4iIklIxV1E\nJAmpuIuIJCEVdxGRJPT/Afo9xgFKsmhyAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#log变换-处理后符合正态分布\n",
    "price_log = pd.DataFrame({\"price\":all_dummy_data.SalePrice, \n",
    "                    \"log_price\":np.log1p(all_dummy_data.SalePrice)})\n",
    "fig = plt.figure()\n",
    "sns.distplot(price_log.log_price.values, bins=50, kde=True)\n",
    "plt.xlabel('log_price', fontsize=12)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 175,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "all_dummy_data[['y_log']] = price_log[[\"log_price\"]]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 数据准备"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 176,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>LotFrontage</th>\n",
       "      <th>LotArea</th>\n",
       "      <th>OverallQual</th>\n",
       "      <th>OverallCond</th>\n",
       "      <th>YearBuilt</th>\n",
       "      <th>YearRemodAdd</th>\n",
       "      <th>MasVnrArea</th>\n",
       "      <th>BsmtFinSF1</th>\n",
       "      <th>BsmtFinSF2</th>\n",
       "      <th>BsmtUnfSF</th>\n",
       "      <th>...</th>\n",
       "      <th>SaleType_ConLI</th>\n",
       "      <th>SaleType_ConLw</th>\n",
       "      <th>SaleType_New</th>\n",
       "      <th>SaleType_Oth</th>\n",
       "      <th>SaleType_WD</th>\n",
       "      <th>SaleCondition_Abnorml</th>\n",
       "      <th>SaleCondition_AdjLand</th>\n",
       "      <th>SaleCondition_Alloca</th>\n",
       "      <th>SaleCondition_Family</th>\n",
       "      <th>SaleCondition_Normal</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>65.0</td>\n",
       "      <td>8450</td>\n",
       "      <td>7</td>\n",
       "      <td>5</td>\n",
       "      <td>2003</td>\n",
       "      <td>2003</td>\n",
       "      <td>196.0</td>\n",
       "      <td>706</td>\n",
       "      <td>0</td>\n",
       "      <td>150</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>80.0</td>\n",
       "      <td>9600</td>\n",
       "      <td>6</td>\n",
       "      <td>8</td>\n",
       "      <td>1976</td>\n",
       "      <td>1976</td>\n",
       "      <td>0.0</td>\n",
       "      <td>978</td>\n",
       "      <td>0</td>\n",
       "      <td>284</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>68.0</td>\n",
       "      <td>11250</td>\n",
       "      <td>7</td>\n",
       "      <td>5</td>\n",
       "      <td>2001</td>\n",
       "      <td>2002</td>\n",
       "      <td>162.0</td>\n",
       "      <td>486</td>\n",
       "      <td>0</td>\n",
       "      <td>434</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>60.0</td>\n",
       "      <td>9550</td>\n",
       "      <td>7</td>\n",
       "      <td>5</td>\n",
       "      <td>1915</td>\n",
       "      <td>1970</td>\n",
       "      <td>0.0</td>\n",
       "      <td>216</td>\n",
       "      <td>0</td>\n",
       "      <td>540</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>84.0</td>\n",
       "      <td>14260</td>\n",
       "      <td>8</td>\n",
       "      <td>5</td>\n",
       "      <td>2000</td>\n",
       "      <td>2000</td>\n",
       "      <td>350.0</td>\n",
       "      <td>655</td>\n",
       "      <td>0</td>\n",
       "      <td>490</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 274 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   LotFrontage  LotArea  OverallQual  OverallCond  YearBuilt  YearRemodAdd  \\\n",
       "0         65.0     8450            7            5       2003          2003   \n",
       "1         80.0     9600            6            8       1976          1976   \n",
       "2         68.0    11250            7            5       2001          2002   \n",
       "3         60.0     9550            7            5       1915          1970   \n",
       "4         84.0    14260            8            5       2000          2000   \n",
       "\n",
       "   MasVnrArea  BsmtFinSF1  BsmtFinSF2  BsmtUnfSF          ...           \\\n",
       "0       196.0         706           0        150          ...            \n",
       "1         0.0         978           0        284          ...            \n",
       "2       162.0         486           0        434          ...            \n",
       "3         0.0         216           0        540          ...            \n",
       "4       350.0         655           0        490          ...            \n",
       "\n",
       "   SaleType_ConLI  SaleType_ConLw  SaleType_New  SaleType_Oth  SaleType_WD  \\\n",
       "0               0               0             0             0            1   \n",
       "1               0               0             0             0            1   \n",
       "2               0               0             0             0            1   \n",
       "3               0               0             0             0            1   \n",
       "4               0               0             0             0            1   \n",
       "\n",
       "   SaleCondition_Abnorml  SaleCondition_AdjLand  SaleCondition_Alloca  \\\n",
       "0                      0                      0                     0   \n",
       "1                      0                      0                     0   \n",
       "2                      0                      0                     0   \n",
       "3                      1                      0                     0   \n",
       "4                      0                      0                     0   \n",
       "\n",
       "   SaleCondition_Family  SaleCondition_Normal  \n",
       "0                     0                     1  \n",
       "1                     0                     1  \n",
       "2                     0                     1  \n",
       "3                     0                     0  \n",
       "4                     0                     1  \n",
       "\n",
       "[5 rows x 274 columns]"
      ]
     },
     "execution_count": 176,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 从原始数据中分离输入特征x和输出y\n",
    "y = all_dummy_data['y_log'].values\n",
    "X = all_dummy_data.drop(['y_log','SalePrice','SaleCondition_Partial','MSSubClass_190',\n",
    "                         'Exterior2nd_CmentBd','MSSubClass_80','MSSubClass_50','RoofStyle_Hip','LotShape_Reg',\n",
    "                         'HouseStyle_1.5Unf','LandSlope_Mod','ExterQual_TA'], axis = 1)\n",
    "\n",
    "#用于后续显示权重系数对应的特征\n",
    "columns = X.columns\n",
    "X.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 177,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(1168, 274)"
      ]
     },
     "execution_count": 177,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#将数据分割训练数据与测试数据\n",
    "from sklearn.model_selection import train_test_split\n",
    "\n",
    "# 随机采样20%的数据构建测试样本，其余作为训练样本\n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=33, test_size=0.2)\n",
    "X_train.shape"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 标准化处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 178,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 数据标准化\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "\n",
    "# 分别初始化对特征和目标值的标准化器\n",
    "ss_X = StandardScaler()\n",
    "\n",
    "# 分别对训练和测试数据的特征以及目标值进行标准化处理\n",
    "X_train = ss_X.fit_transform(X_train)\n",
    "X_test = ss_X.transform(X_test)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ridge Regression"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 179,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The r2 score of RidgeCV on test is 0.807244137515\n",
      "The r2 score of RidgeCV on train is 0.920542973751\n",
      "The MSE score of RidgeCV on test is 0.0312962670161\n",
      "The MSE score of RidgeCV on train is 0.0126072623702\n"
     ]
    }
   ],
   "source": [
    "#岭回归／L2正则\n",
    "#class sklearn.linear_model.RidgeCV(alphas=(0.1, 1.0, 10.0), fit_intercept=True, \n",
    "#                                  normalize=False, scoring=None, cv=None, gcv_mode=None, \n",
    "#                                  store_cv_values=False)\n",
    "from sklearn.linear_model import  RidgeCV\n",
    "\n",
    "#设置超参数（正则参数）范围\n",
    "#alphas = [ 0.01, 0.1, 1, 10,100]\n",
    "n_alphas = 100\n",
    "alphas = np.logspace(0.01,100,n_alphas)\n",
    "\n",
    "#生成一个RidgeCV实例\n",
    "ridge = RidgeCV(alphas=alphas, store_cv_values=True)  \n",
    "\n",
    "#模型训练\n",
    "ridge.fit(X_train, y_train)    \n",
    "\n",
    "#预测\n",
    "y_test_pred_ridge = ridge.predict(X_test)\n",
    "y_train_pred_ridge = ridge.predict(X_train)\n",
    "\n",
    "\n",
    "# 评估，使用r2_score评价模型在测试集和训练集上的性能\n",
    "print('The r2 score of RidgeCV on test is', r2_score(y_test, y_test_pred_ridge))\n",
    "print('The r2 score of RidgeCV on train is', r2_score(y_train, y_train_pred_ridge))\n",
    "print('The MSE score of RidgeCV on test is', mean_squared_error(y_test, y_test_pred_ridge))\n",
    "print('The MSE score of RidgeCV on train is', mean_squared_error(y_train, y_train_pred_ridge))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 180,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEKCAYAAADjDHn2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBo\ndHRwOi8vbWF0c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GXkLv6bLfAy4DPsks+7UJzffQu3rqAeBNVbVt0TWMelhIktqN+mEoSdIcGBaSpFaG\nhSSplWEhSWplWEiSWhkWGnlJJhe5/jXNJbmHavPZJIccI3kubWa0X53kL+faXloMw0JahCRPB5ZV\n1fjh/uyqmgDuSHLW4f5sjR7DQmo0d7y+uxkX4WtJzmvmPyrJe5sxE/48ybVJpu8O/iX67g5O8r4k\n25q2v32Qz5lM8vtJbkzy6SSr+xa/LsmXkvxDkhc27dcn+Zum/Y1Jfqav/SebGqROGRbSw14DPIve\nOBAvA97dPHPnNcB64HR6dwc/v2+ds+g95XTa26tqDHgG8OIkz5jlc44BbqyqZwN/Te9u3GnLq+pM\n4Nf75t8JvLxpfx7wh33ttwEvnP+mSvOzvL2JNDJeAHy4qvbTe0jbXwPPaeZ/rKoOAN9Ncn3fOj9B\n77Hg0/5pkovo/W79BL1Btb4643MOAB9pXv8JvYffTZt+fQO9gAI4CnhP8yiP/cCT+9rfSe9pq1Kn\nDAvpYbM92vlQ8wEeBFZBb8hW4K3Ac6rqniR/NL2sRf8zd6afX7Sfh38/f4Pe84CeSe9owJ6+9qua\nGqROeRhKetjngPPSG7d7Nb1R574EfB74xebcxePpPdBt2teBJzWvH0NvDIl7m3azjasAvd+76XMe\nb2je/1COB+5oejb/jN5DL6c9Gbh51rWkJWTPQnrY/6R3PuIr9P7a/82q+m6Sj9N79PXNwD/Qe1rv\nvc06/4deePxVVX0lyU3ALfSe+Pq3B/mc3cDTk9zQvM95LXW9F/h4ktfRe/T27r5l/6SpQeqUT52V\n5iDJsVU1meQker2Ns5ogOZreF/hZzbmOubzXZFUdu0R1fQ7YXFX3LMX7SQdjz0Kamz9PcgK9cSLe\n0Qw0RFU9mOQyeuMnfOdwFtQcKvsDg0KHgz0LSVIrT3BLkloZFpKkVoaFJKmVYSFJamVYSJJaGRaS\npFb/H5viTKW1vcRLAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "alpha is: 1096.47819614\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>coef_ridge</th>\n",
       "      <th>columns</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.031264</td>\n",
       "      <td>OverallQual</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>0.030533</td>\n",
       "      <td>GrLivArea</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>0.026152</td>\n",
       "      <td>1stFlrSF</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>0.024564</td>\n",
       "      <td>TotalBsmtSF</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>0.020965</td>\n",
       "      <td>TotRmsAbvGrd</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>0.019149</td>\n",
       "      <td>GarageCars</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>0.018940</td>\n",
       "      <td>GarageArea</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>0.018428</td>\n",
       "      <td>Fireplaces</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>0.017057</td>\n",
       "      <td>BsmtFinSF1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>0.016944</td>\n",
       "      <td>FullBath</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>227</th>\n",
       "      <td>0.015877</td>\n",
       "      <td>KitchenQual_Ex</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>185</th>\n",
       "      <td>0.014989</td>\n",
       "      <td>BsmtQual_Ex</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0.014684</td>\n",
       "      <td>YearRemodAdd</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.014549</td>\n",
       "      <td>OverallCond</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>76</th>\n",
       "      <td>0.014226</td>\n",
       "      <td>Neighborhood_Crawfor</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>0.013388</td>\n",
       "      <td>2ndFlrSF</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.012792</td>\n",
       "      <td>LotArea</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>86</th>\n",
       "      <td>0.012574</td>\n",
       "      <td>Neighborhood_NridgHt</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>92</th>\n",
       "      <td>0.011920</td>\n",
       "      <td>Neighborhood_StoneBr</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>0.011430</td>\n",
       "      <td>HalfBath</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>85</th>\n",
       "      <td>0.011287</td>\n",
       "      <td>Neighborhood_NoRidge</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>0.010958</td>\n",
       "      <td>BedroomAbvGr</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>171</th>\n",
       "      <td>0.010380</td>\n",
       "      <td>ExterQual_Ex</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>194</th>\n",
       "      <td>0.010293</td>\n",
       "      <td>BsmtExposure_Gd</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>0.010271</td>\n",
       "      <td>WoodDeckSF</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199</th>\n",
       "      <td>0.010158</td>\n",
       "      <td>BsmtFinType1_GLQ</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>0.009737</td>\n",
       "      <td>OpenPorchSF</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.009728</td>\n",
       "      <td>YearBuilt</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>215</th>\n",
       "      <td>0.009381</td>\n",
       "      <td>HeatingQC_Ex</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>221</th>\n",
       "      <td>0.009264</td>\n",
       "      <td>CentralAir_Y</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>272</th>\n",
       "      <td>-0.004729</td>\n",
       "      <td>SaleCondition_Family</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>189</th>\n",
       "      <td>-0.004836</td>\n",
       "      <td>BsmtCond_Fa</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>-0.004997</td>\n",
       "      <td>Condition1_Artery</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>115</th>\n",
       "      <td>-0.005016</td>\n",
       "      <td>BldgType_Twnhs</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>89</th>\n",
       "      <td>-0.005093</td>\n",
       "      <td>Neighborhood_Sawyer</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>82</th>\n",
       "      <td>-0.005104</td>\n",
       "      <td>Neighborhood_NAmes</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>182</th>\n",
       "      <td>-0.005250</td>\n",
       "      <td>Foundation_Slab</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>202</th>\n",
       "      <td>-0.005296</td>\n",
       "      <td>BsmtFinType1_Unf</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>87</th>\n",
       "      <td>-0.005306</td>\n",
       "      <td>Neighborhood_OldTown</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>118</th>\n",
       "      <td>-0.005360</td>\n",
       "      <td>HouseStyle_1Story</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>246</th>\n",
       "      <td>-0.005385</td>\n",
       "      <td>GarageFinish_Unf</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>139</th>\n",
       "      <td>-0.005393</td>\n",
       "      <td>Exterior1st_BrkComm</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>125</th>\n",
       "      <td>-0.005485</td>\n",
       "      <td>RoofStyle_Gable</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>-0.005575</td>\n",
       "      <td>MSSubClass_160</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>79</th>\n",
       "      <td>-0.005645</td>\n",
       "      <td>Neighborhood_IDOTRR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>268</th>\n",
       "      <td>-0.005943</td>\n",
       "      <td>SaleType_WD</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>169</th>\n",
       "      <td>-0.006098</td>\n",
       "      <td>MasVnrType_None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>212</th>\n",
       "      <td>-0.006107</td>\n",
       "      <td>Heating_Grav</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>219</th>\n",
       "      <td>-0.006555</td>\n",
       "      <td>HeatingQC_TA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>188</th>\n",
       "      <td>-0.007402</td>\n",
       "      <td>BsmtQual_TA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>232</th>\n",
       "      <td>-0.008288</td>\n",
       "      <td>Functional_Maj2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>51</th>\n",
       "      <td>-0.008971</td>\n",
       "      <td>MSZoning_RM</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>220</th>\n",
       "      <td>-0.009264</td>\n",
       "      <td>CentralAir_N</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>80</th>\n",
       "      <td>-0.009279</td>\n",
       "      <td>Neighborhood_MeadowV</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>269</th>\n",
       "      <td>-0.009628</td>\n",
       "      <td>SaleCondition_Abnorml</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>77</th>\n",
       "      <td>-0.010620</td>\n",
       "      <td>Neighborhood_Edwards</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>230</th>\n",
       "      <td>-0.010801</td>\n",
       "      <td>KitchenQual_TA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>-0.011029</td>\n",
       "      <td>MSZoning_C (all)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>-0.011274</td>\n",
       "      <td>MSSubClass_30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>108</th>\n",
       "      <td>-0.011677</td>\n",
       "      <td>Condition2_PosN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>274 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     coef_ridge                columns\n",
       "2      0.031264            OverallQual\n",
       "14     0.030533              GrLivArea\n",
       "11     0.026152               1stFlrSF\n",
       "10     0.024564            TotalBsmtSF\n",
       "21     0.020965           TotRmsAbvGrd\n",
       "24     0.019149             GarageCars\n",
       "25     0.018940             GarageArea\n",
       "22     0.018428             Fireplaces\n",
       "7      0.017057             BsmtFinSF1\n",
       "17     0.016944               FullBath\n",
       "227    0.015877         KitchenQual_Ex\n",
       "185    0.014989            BsmtQual_Ex\n",
       "5      0.014684           YearRemodAdd\n",
       "3      0.014549            OverallCond\n",
       "76     0.014226   Neighborhood_Crawfor\n",
       "12     0.013388               2ndFlrSF\n",
       "1      0.012792                LotArea\n",
       "86     0.012574   Neighborhood_NridgHt\n",
       "92     0.011920   Neighborhood_StoneBr\n",
       "18     0.011430               HalfBath\n",
       "85     0.011287   Neighborhood_NoRidge\n",
       "19     0.010958           BedroomAbvGr\n",
       "171    0.010380           ExterQual_Ex\n",
       "194    0.010293        BsmtExposure_Gd\n",
       "26     0.010271             WoodDeckSF\n",
       "199    0.010158       BsmtFinType1_GLQ\n",
       "27     0.009737            OpenPorchSF\n",
       "4      0.009728              YearBuilt\n",
       "215    0.009381           HeatingQC_Ex\n",
       "221    0.009264           CentralAir_Y\n",
       "..          ...                    ...\n",
       "272   -0.004729   SaleCondition_Family\n",
       "189   -0.004836            BsmtCond_Fa\n",
       "95    -0.004997      Condition1_Artery\n",
       "115   -0.005016         BldgType_Twnhs\n",
       "89    -0.005093    Neighborhood_Sawyer\n",
       "82    -0.005104     Neighborhood_NAmes\n",
       "182   -0.005250        Foundation_Slab\n",
       "202   -0.005296       BsmtFinType1_Unf\n",
       "87    -0.005306   Neighborhood_OldTown\n",
       "118   -0.005360      HouseStyle_1Story\n",
       "246   -0.005385       GarageFinish_Unf\n",
       "139   -0.005393    Exterior1st_BrkComm\n",
       "125   -0.005485        RoofStyle_Gable\n",
       "36    -0.005575         MSSubClass_160\n",
       "79    -0.005645    Neighborhood_IDOTRR\n",
       "268   -0.005943            SaleType_WD\n",
       "169   -0.006098        MasVnrType_None\n",
       "212   -0.006107           Heating_Grav\n",
       "219   -0.006555           HeatingQC_TA\n",
       "188   -0.007402            BsmtQual_TA\n",
       "232   -0.008288        Functional_Maj2\n",
       "51    -0.008971            MSZoning_RM\n",
       "220   -0.009264           CentralAir_N\n",
       "80    -0.009279   Neighborhood_MeadowV\n",
       "269   -0.009628  SaleCondition_Abnorml\n",
       "77    -0.010620   Neighborhood_Edwards\n",
       "230   -0.010801         KitchenQual_TA\n",
       "47    -0.011029       MSZoning_C (all)\n",
       "39    -0.011274          MSSubClass_30\n",
       "108   -0.011677        Condition2_PosN\n",
       "\n",
       "[274 rows x 2 columns]"
      ]
     },
     "execution_count": 180,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#可视化\n",
    "mse_mean = np.mean(ridge.cv_values_, axis = 0)\n",
    "plt.plot(np.log10(alphas), mse_mean.reshape(len(alphas),1)) \n",
    "\n",
    "#这是为了标出最佳参数的位置，不是必须\n",
    "plt.plot(np.log10(ridge.alpha_)*np.ones(4), [0.20, 0.28, 0.29, 0.30])\n",
    "\n",
    "plt.xlabel('log(alpha)')\n",
    "plt.ylabel('mse')\n",
    "plt.show()\n",
    "\n",
    "print ('alpha is:', ridge.alpha_)\n",
    "\n",
    "# 看看各特征的权重系数，系数的绝对值大小可视为该特征的重要性\n",
    "fs = pd.DataFrame({\"columns\":list(columns),  \"coef_ridge\":list((ridge.coef_.T))})\n",
    "fs.sort_values(by=['coef_ridge'],ascending=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## LASSO Regression"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 181,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The r2 score of LassoCV on test is 0.786511874439\n",
      "The r2 score of LassoCV on train is 0.93008478989\n",
      "The MSE score of LassoCV on test is 0.0346624029805\n",
      "The MSE score of LassoCV on train is 0.0110932844978\n"
     ]
    }
   ],
   "source": [
    "#### Lasso／L1正则\n",
    "#class sklearn.linear_model.LassoCV(eps=0.001, n_alphas=100, alphas=None, fit_intercept=True,\n",
    "#                                   normalize=False, precompute=’auto’, max_iter=1000,\n",
    "#                                   tol=0.0001, copy_X=True, cv=None, verbose=False, n_jobs=1,\n",
    "#                                   positive=False, random_state=None, selection=’cyclic’)\n",
    "                                    \n",
    "from sklearn.linear_model import LassoCV\n",
    "\n",
    "#设置超参数搜索范围\n",
    "#alphas = [ 0.01, 0.1, 1, 10,100]\n",
    "\n",
    "#生成一个LassoCV实例\n",
    "#lasso = LassoCV(alphas=alphas)  \n",
    "lasso = LassoCV(eps=0.001, n_alphas=100)  \n",
    "\n",
    "#训练（内含CV）\n",
    "lasso.fit(X_train, y_train)  \n",
    "\n",
    "#测试\n",
    "y_test_pred_lasso = lasso.predict(X_test)\n",
    "y_train_pred_lasso = lasso.predict(X_train)\n",
    "\n",
    "\n",
    "# 评估，使用r2_score评价模型在测试集和训练集上的性能\n",
    "print('The r2 score of LassoCV on test is', r2_score(y_test, y_test_pred_lasso))\n",
    "print ('The r2 score of LassoCV on train is', r2_score(y_train, y_train_pred_lasso))\n",
    "print('The MSE score of LassoCV on test is', mean_squared_error(y_test, y_test_pred_lasso))\n",
    "print('The MSE score of LassoCV on train is', mean_squared_error(y_train, y_train_pred_lasso))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 182,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEKCAYAAADjDHn2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xt8XHWd//HXJ/c0bdNbSi9paUsv\nUKAUTItyE0Ru7kq9gBT8KSAru/rjt+vuqos/d9HF3+5vlV0vu7I/RUVURHQBpUq1gCCugNAUeqFX\n0hJomqZNL0mae2bm8/tj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+98AJgDnA78GfCOlG3OBdalzH/e3auAJcA7zWxJP+9TBrzg\n7mcBT/HG63kVuPty4FMpy/cDlwTtrwH+PaV9NXD+0HdVZGhG5IUERY7TecBP3D0O7DOzp4BlwfL/\ncvcE0GBmT6ZsMx1oTJn/UHCZ7oJg3WKSl2NJlQB+GkzfCzyUsq53eh3JgAIoBL5pZkuBOLAwpf1+\nkpesEAmVwkLkqP4uUX2s5QAdQAmAmc0FPg0sc/fDZnZP77pBpF5zpyt4jnP0/8+/Jnk9ozNI9gZ0\nprQvCWoQCZW6oUSO+j1wjZnlB+MIFwDPA38APhiMXZzAGy/5vhWYH0yPB9qA5qDdFQO8Tx7QO+Zx\nXfD6x1IO7A2ObD5C8vafvRaSu1d5lRyiIwuRo35OcjxiA8m/9j/r7g1m9iBwMckv5R3Ac0BzsM0j\nJMPjcXffYGYvkrz66i7g6QHepw041czWBa9zzSB1/SfwoJldDTwZbN/roqAGkVDpqrMiaTCzse7e\namaTSR5tnBsESSnJL/Bzg7GOdF6r1d3HDlNdvwdWePL+6iKh0ZGFSHp+ZWYTgCLgS+7eAODuHWb2\nBZL3an4tkwUFXWVfVVBIJujIQkREBqUBbhERGZTCQkREBqWwEBGRQSksRERkUAoLEREZlMJCREQG\n9f8BmLlPM2T5ZboAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "alpha is: 0.00462664824079\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>coef_lasso</th>\n",
       "      <th>coef_ridge</th>\n",
       "      <th>columns</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>0.116511</td>\n",
       "      <td>0.030533</td>\n",
       "      <td>GrLivArea</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.081220</td>\n",
       "      <td>0.031264</td>\n",
       "      <td>OverallQual</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.043884</td>\n",
       "      <td>0.009728</td>\n",
       "      <td>YearBuilt</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>0.042174</td>\n",
       "      <td>0.024564</td>\n",
       "      <td>TotalBsmtSF</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.033931</td>\n",
       "      <td>0.014549</td>\n",
       "      <td>OverallCond</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>0.029237</td>\n",
       "      <td>0.019149</td>\n",
       "      <td>GarageCars</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>0.026869</td>\n",
       "      <td>0.017057</td>\n",
       "      <td>BsmtFinSF1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0.020285</td>\n",
       "      <td>0.014684</td>\n",
       "      <td>YearRemodAdd</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>76</th>\n",
       "      <td>0.019981</td>\n",
       "      <td>0.014226</td>\n",
       "      <td>Neighborhood_Crawfor</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.017160</td>\n",
       "      <td>0.012792</td>\n",
       "      <td>LotArea</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>0.015265</td>\n",
       "      <td>0.018428</td>\n",
       "      <td>Fireplaces</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>215</th>\n",
       "      <td>0.013033</td>\n",
       "      <td>0.009381</td>\n",
       "      <td>HeatingQC_Ex</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>0.012801</td>\n",
       "      <td>0.018940</td>\n",
       "      <td>GarageArea</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>86</th>\n",
       "      <td>0.012480</td>\n",
       "      <td>0.012574</td>\n",
       "      <td>Neighborhood_NridgHt</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>140</th>\n",
       "      <td>0.011733</td>\n",
       "      <td>0.009025</td>\n",
       "      <td>Exterior1st_BrkFace</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>92</th>\n",
       "      <td>0.011629</td>\n",
       "      <td>0.011920</td>\n",
       "      <td>Neighborhood_StoneBr</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>227</th>\n",
       "      <td>0.011272</td>\n",
       "      <td>0.015877</td>\n",
       "      <td>KitchenQual_Ex</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>185</th>\n",
       "      <td>0.010681</td>\n",
       "      <td>0.014989</td>\n",
       "      <td>BsmtQual_Ex</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>181</th>\n",
       "      <td>0.010404</td>\n",
       "      <td>0.007324</td>\n",
       "      <td>Foundation_PConc</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>0.009264</td>\n",
       "      <td>0.010271</td>\n",
       "      <td>WoodDeckSF</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>266</th>\n",
       "      <td>0.009158</td>\n",
       "      <td>0.007305</td>\n",
       "      <td>SaleType_New</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>237</th>\n",
       "      <td>0.008931</td>\n",
       "      <td>0.006346</td>\n",
       "      <td>Functional_Typ</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>112</th>\n",
       "      <td>0.008875</td>\n",
       "      <td>0.005549</td>\n",
       "      <td>BldgType_1Fam</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>194</th>\n",
       "      <td>0.008707</td>\n",
       "      <td>0.010293</td>\n",
       "      <td>BsmtExposure_Gd</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>0.008179</td>\n",
       "      <td>0.008917</td>\n",
       "      <td>BsmtFullBath</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>0.008131</td>\n",
       "      <td>0.008574</td>\n",
       "      <td>ScreenPorch</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>0.007807</td>\n",
       "      <td>0.005026</td>\n",
       "      <td>Condition1_Norm</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>0.007263</td>\n",
       "      <td>0.005831</td>\n",
       "      <td>GarageYrBlt</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>0.007195</td>\n",
       "      <td>0.020965</td>\n",
       "      <td>TotRmsAbvGrd</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>0.006346</td>\n",
       "      <td>0.009737</td>\n",
       "      <td>OpenPorchSF</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>202</th>\n",
       "      <td>-0.000337</td>\n",
       "      <td>-0.005296</td>\n",
       "      <td>BsmtFinType1_Unf</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>119</th>\n",
       "      <td>-0.000715</td>\n",
       "      <td>0.000704</td>\n",
       "      <td>HouseStyle_2.5Fin</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>204</th>\n",
       "      <td>-0.000734</td>\n",
       "      <td>-0.003276</td>\n",
       "      <td>BsmtFinType2_BLQ</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>240</th>\n",
       "      <td>-0.000948</td>\n",
       "      <td>-0.002280</td>\n",
       "      <td>GarageType_Basment</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>167</th>\n",
       "      <td>-0.001220</td>\n",
       "      <td>-0.003648</td>\n",
       "      <td>MasVnrType_BrkCmn</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>130</th>\n",
       "      <td>-0.001757</td>\n",
       "      <td>-0.004100</td>\n",
       "      <td>RoofMatl_CompShg</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>268</th>\n",
       "      <td>-0.001879</td>\n",
       "      <td>-0.005943</td>\n",
       "      <td>SaleType_WD</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100</th>\n",
       "      <td>-0.002560</td>\n",
       "      <td>-0.003021</td>\n",
       "      <td>Condition1_RRAe</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>196</th>\n",
       "      <td>-0.003449</td>\n",
       "      <td>-0.004552</td>\n",
       "      <td>BsmtExposure_No</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>230</th>\n",
       "      <td>-0.003931</td>\n",
       "      <td>-0.010801</td>\n",
       "      <td>KitchenQual_TA</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>235</th>\n",
       "      <td>-0.003935</td>\n",
       "      <td>-0.003547</td>\n",
       "      <td>Functional_Mod</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>52</th>\n",
       "      <td>-0.004039</td>\n",
       "      <td>-0.002542</td>\n",
       "      <td>Street_Grvl</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>80</th>\n",
       "      <td>-0.004358</td>\n",
       "      <td>-0.009279</td>\n",
       "      <td>Neighborhood_MeadowV</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>139</th>\n",
       "      <td>-0.004709</td>\n",
       "      <td>-0.005393</td>\n",
       "      <td>Exterior1st_BrkComm</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>272</th>\n",
       "      <td>-0.005077</td>\n",
       "      <td>-0.004729</td>\n",
       "      <td>SaleCondition_Family</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>-0.005137</td>\n",
       "      <td>-0.004997</td>\n",
       "      <td>Condition1_Artery</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>236</th>\n",
       "      <td>-0.005187</td>\n",
       "      <td>-0.003975</td>\n",
       "      <td>Functional_Sev</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>115</th>\n",
       "      <td>-0.005655</td>\n",
       "      <td>-0.005016</td>\n",
       "      <td>BldgType_Twnhs</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>-0.006426</td>\n",
       "      <td>-0.005575</td>\n",
       "      <td>MSSubClass_160</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>189</th>\n",
       "      <td>-0.007031</td>\n",
       "      <td>-0.004836</td>\n",
       "      <td>BsmtCond_Fa</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>212</th>\n",
       "      <td>-0.007294</td>\n",
       "      <td>-0.006107</td>\n",
       "      <td>Heating_Grav</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>77</th>\n",
       "      <td>-0.007884</td>\n",
       "      <td>-0.010620</td>\n",
       "      <td>Neighborhood_Edwards</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>-0.008701</td>\n",
       "      <td>-0.004042</td>\n",
       "      <td>KitchenAbvGr</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>-0.008832</td>\n",
       "      <td>-0.011274</td>\n",
       "      <td>MSSubClass_30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>232</th>\n",
       "      <td>-0.009135</td>\n",
       "      <td>-0.008288</td>\n",
       "      <td>Functional_Maj2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>220</th>\n",
       "      <td>-0.012396</td>\n",
       "      <td>-0.009264</td>\n",
       "      <td>CentralAir_N</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>269</th>\n",
       "      <td>-0.014265</td>\n",
       "      <td>-0.009628</td>\n",
       "      <td>SaleCondition_Abnorml</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>-0.016486</td>\n",
       "      <td>-0.011029</td>\n",
       "      <td>MSZoning_C (all)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>51</th>\n",
       "      <td>-0.020509</td>\n",
       "      <td>-0.008971</td>\n",
       "      <td>MSZoning_RM</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>108</th>\n",
       "      <td>-0.030145</td>\n",
       "      <td>-0.011677</td>\n",
       "      <td>Condition2_PosN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>274 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     coef_lasso  coef_ridge                columns\n",
       "14     0.116511    0.030533              GrLivArea\n",
       "2      0.081220    0.031264            OverallQual\n",
       "4      0.043884    0.009728              YearBuilt\n",
       "10     0.042174    0.024564            TotalBsmtSF\n",
       "3      0.033931    0.014549            OverallCond\n",
       "24     0.029237    0.019149             GarageCars\n",
       "7      0.026869    0.017057             BsmtFinSF1\n",
       "5      0.020285    0.014684           YearRemodAdd\n",
       "76     0.019981    0.014226   Neighborhood_Crawfor\n",
       "1      0.017160    0.012792                LotArea\n",
       "22     0.015265    0.018428             Fireplaces\n",
       "215    0.013033    0.009381           HeatingQC_Ex\n",
       "25     0.012801    0.018940             GarageArea\n",
       "86     0.012480    0.012574   Neighborhood_NridgHt\n",
       "140    0.011733    0.009025    Exterior1st_BrkFace\n",
       "92     0.011629    0.011920   Neighborhood_StoneBr\n",
       "227    0.011272    0.015877         KitchenQual_Ex\n",
       "185    0.010681    0.014989            BsmtQual_Ex\n",
       "181    0.010404    0.007324       Foundation_PConc\n",
       "26     0.009264    0.010271             WoodDeckSF\n",
       "266    0.009158    0.007305           SaleType_New\n",
       "237    0.008931    0.006346         Functional_Typ\n",
       "112    0.008875    0.005549          BldgType_1Fam\n",
       "194    0.008707    0.010293        BsmtExposure_Gd\n",
       "15     0.008179    0.008917           BsmtFullBath\n",
       "30     0.008131    0.008574            ScreenPorch\n",
       "97     0.007807    0.005026        Condition1_Norm\n",
       "23     0.007263    0.005831            GarageYrBlt\n",
       "21     0.007195    0.020965           TotRmsAbvGrd\n",
       "27     0.006346    0.009737            OpenPorchSF\n",
       "..          ...         ...                    ...\n",
       "202   -0.000337   -0.005296       BsmtFinType1_Unf\n",
       "119   -0.000715    0.000704      HouseStyle_2.5Fin\n",
       "204   -0.000734   -0.003276       BsmtFinType2_BLQ\n",
       "240   -0.000948   -0.002280     GarageType_Basment\n",
       "167   -0.001220   -0.003648      MasVnrType_BrkCmn\n",
       "130   -0.001757   -0.004100       RoofMatl_CompShg\n",
       "268   -0.001879   -0.005943            SaleType_WD\n",
       "100   -0.002560   -0.003021        Condition1_RRAe\n",
       "196   -0.003449   -0.004552        BsmtExposure_No\n",
       "230   -0.003931   -0.010801         KitchenQual_TA\n",
       "235   -0.003935   -0.003547         Functional_Mod\n",
       "52    -0.004039   -0.002542            Street_Grvl\n",
       "80    -0.004358   -0.009279   Neighborhood_MeadowV\n",
       "139   -0.004709   -0.005393    Exterior1st_BrkComm\n",
       "272   -0.005077   -0.004729   SaleCondition_Family\n",
       "95    -0.005137   -0.004997      Condition1_Artery\n",
       "236   -0.005187   -0.003975         Functional_Sev\n",
       "115   -0.005655   -0.005016         BldgType_Twnhs\n",
       "36    -0.006426   -0.005575         MSSubClass_160\n",
       "189   -0.007031   -0.004836            BsmtCond_Fa\n",
       "212   -0.007294   -0.006107           Heating_Grav\n",
       "77    -0.007884   -0.010620   Neighborhood_Edwards\n",
       "20    -0.008701   -0.004042           KitchenAbvGr\n",
       "39    -0.008832   -0.011274          MSSubClass_30\n",
       "232   -0.009135   -0.008288        Functional_Maj2\n",
       "220   -0.012396   -0.009264           CentralAir_N\n",
       "269   -0.014265   -0.009628  SaleCondition_Abnorml\n",
       "47    -0.016486   -0.011029       MSZoning_C (all)\n",
       "51    -0.020509   -0.008971            MSZoning_RM\n",
       "108   -0.030145   -0.011677        Condition2_PosN\n",
       "\n",
       "[274 rows x 3 columns]"
      ]
     },
     "execution_count": 182,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mses = np.mean(lasso.mse_path_, axis = 1)\n",
    "plt.plot(np.log10(lasso.alphas_), mses) \n",
    "#plt.plot(np.log10(lasso.alphas_)*np.ones(3), [0.3, 0.4, 1.0])\n",
    "plt.xlabel('log(alpha)')\n",
    "plt.ylabel('mse')\n",
    "plt.show()    \n",
    "            \n",
    "print ('alpha is:', lasso.alpha_)\n",
    "\n",
    "# 看看各特征的权重系数，系数的绝对值大小可视为该特征的重要性\n",
    "fs = pd.DataFrame({\"columns\":list(columns), \"coef_ridge\":list((ridge.coef_.T)), \"coef_lasso\":list((lasso.coef_.T))})\n",
    "fs.sort_values(by=['coef_lasso'],ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
